<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');

class template_list_model extends Model
{
	var $url_prefix = 'admin/template.template.lists';
	var $url_prefix2 = 'admin/template.template.detail';
	var $start_segment = 3;
	var $start;
	var $msg_cache_prefix = 'msg';
	var $filter_cache_prefix = 'filter';
	var $cache;
	var $cache_name = 'template';
	var $columns = array();
	var $item_segment = 4;
	
	function template_list_model()
	{
		parent::Model();
		
		global $CI;
		$start = $CI->uri->segment($this->start_segment);
		$this->start = $start?$start:0;
		
		$this->cache = new Session_lite($this->cache_name);
		
		$this->columns = array(
			'id'=>TEMPLATES.'.'.TEMPLATES_TEMPLATE_TYPE_ID,
			'type'=>TEMPLATE_TYPES.'.'.TEMPLATE_TYPES_NAME,
			'subject'=>TEMPLATES.'.'.TEMPLATES_SUBJECT,
		);
	}
	
	function admin_id()
	{
		global $CI;
		$a = $CI->session->userdata('admin_auth_logged');
		return $a['admin_id'];
	}
}

?>
